package cn.itcast.scala

object PatternMatch {
  def main(args: Array[String]): Unit = {
    println(matchTest(1))
  }
  // pattern match
  def matchTest(x:Int): String = {
    x+1 match {
      case 1 => "one"
      case 2 => "two"
      case _ => "many"
    }
  }
}
